package com.black.app.domain.req.exercise.query;

import cn.hutool.core.util.StrUtil;
import com.black.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString(callSuper = true)
@ApiModel(value = "AppExercisePersonalizeQueryReq", description = "查询私人定制请求参数")
public class AppExercisePersonalizeQueryReq extends PageAbstructReq {
    /**
     * 用户id
     */
    @ApiModelProperty(value = "id")
    private Long personalizeId;


    /**
     * 身高
     */
    @ApiModelProperty(value = "身高")
    private Double height;

    /**
     * 当前体型id
     */
    @ApiModelProperty(value = "当前体型id")
    private Integer nowBodyId;

    /**
     * 当前体重
     */
    @ApiModelProperty(value = "当前体重")
    private Double weight;

    /**
     * 期望体型
     */
    @ApiModelProperty(value = "期望体型")
    private String targetBody;



    @Override
    public String getOrderBy() {
        if (StrUtil.isNotBlank(super.getOrderByColumn())){
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
